function cluster_position = NEAREST_DISTANCE(A,B,C,A_center,B_center,C_center)
%NEAREST_DISTANCE returns cluster position according to distance from
%center

Total_files = length(A);            % A or B or C should be same
Total_clusters = length(A_center);  % same for A/B/C
distance = 0;                       % initializing value
dummy = 0;                          % what it says
for i = 1:Total_files
    for j = 1:Total_clusters
        distance(j) = sqrt( (A(i)-A_center(j))^2 + (B(i)-B_center(j))^2 + (C(i)-C_center(j))^2);
    end
    [dummy, cluster_position(i)] = min(distance);
end

